import request from '../request';

const url = '/course';
function getPrivateDownloadLink(key) {
  return request.ajax(`/storage/private/download/url?key=${key}`)
}

function getCourseList(params) {
  return request.ajax(url, params)
}

function getCourseById(id) {
  return request.ajax(`${url}/${id}`)
}

const training = {
  getPrivateDownloadLink, getCourseList, getCourseById
};

export default training;